package com.service.product;

import com.dao.mapper.Product;
import com.dao.mapper.ProductMapper;
import com.service.ApplicationContextService;

import java.util.List;

public class ProductService extends ApplicationContextService {

    public static List<Product> getAll(){
        ProductMapper mapper = getApplicationContext(ProductMapper.class);
        return mapper.getAll();
    }

    public static Product getOne(Integer id){
        ProductMapper mapper = getApplicationContext(ProductMapper.class);
        return mapper.getOne(id);
    }
}
